package com.woniuxy.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.woniuxy.controller.form.*;
import com.woniuxy.dao.model.DietOrder;
import com.baomidou.mybatisplus.extension.service.IService;
import com.woniuxy.service.dto.AllCartListDto;
import com.woniuxy.service.dto.OrderCustomerDto;
import com.woniuxy.service.dto.OrderDetailsDto;
import com.woniuxy.service.dto.OrderStoreDto;

import java.util.ArrayList;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author psy
 * @since 2022-06-28
 */
public interface DietOrderService extends IService<DietOrder> {

    boolean addOrder(CreateOrderForm createOrderForm);

    boolean updateOrderByPayFinish(PayFinishForm payFinishForm);

    boolean storeAcceptOrder(StoreAcceptOrderForm acceptOrderForm);

    boolean buycancelorder(String orderNum);

    boolean storeDispatching(StoreDispatchingForm storeDispatchingForm);

    boolean storeRefuse(String orderNum,String operReason);

    boolean conrierRefuse(String orderNum, String deliveryRefuseReason);

    boolean waitDispatching(String orderNum);

    boolean finishOrder(String orderNum);

    Page<OrderCustomerDto> getOrderByCustomerId(OrderCustomerLookForm orderCustomerLookForm);

    OrderDetailsDto getOrderDetailsByOrderNum(String orderNum,String storeName) throws JsonProcessingException;

    Page<OrderStoreDto> getOrderByStoreId(OrderStoreLookForm orderStoreLookForm);

    AllCartListDto orderAgain(Long id, String orderNum, String storeName);
}
